package com.hmall.cart;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

//方式一：设置OpenFeign包扫描的位置
//@EnableFeignClients(clients = ItemClient.class)

//方式二：设置OpenFeign包扫描的位置
@EnableFeignClients(basePackages = "com.hmall.api.client"
         //全局配置，在@EnableFeignClients中配置，针对所有FeignClient生效。
        , defaultConfiguration = com.hmall.api.config.DefaultFeignConfig.class)
@MapperScan("com.hmall.cart.mapper")
@SpringBootApplication
public class CartApplication {
    public static void main(String[] args) {
        SpringApplication.run(CartApplication.class, args);
    }
/*
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }*/
}